#!/bin/bash
#
# run_gem5_alpha_spec06_benchmark.sh
# Author: Mark Gottscho Email: mgottscho@ucla.edu
# Copyright (C) 2014 Mark Gottscho
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

GEM5_DIR=/home/jiangfang/workspace/gem5_home/gem5-sp



# cpu17Rate=(perlbench_r gcc_r mcf_r omnetpp_r xalancbmk_r x264_r deepsjeng_r 
#                 leela_r exchange2_r xz_r 
#                 bwaves_r cactuBSSN_r namd_r parest_r povray_r lbm_r wrf_r 
#                 blender_r  cam4_r imagick_r nab_r fotonik3d_r roms_r)

# cpu17Speed=(perlbench_s gcc_s mcf_s omnetpp_s xalancbmk_s x264_s deepsjeng_s 
#                 leela_s exchange2_s xz_s 
#                 bwaves_s cactuBSSN_s lbm_s wrf_s 
#                 cam4_s pop2_s imagick_s nab_s fotonik3d_s roms_s)
# 23 + 20 + 
# cpu17=(perlbench_r gcc_r mcf_r omnetpp_r xalancbmk_r x264_r deepsjeng_r 
#                 leela_r exchange2_r xz_r 
#                 bwaves_r cactuBSSN_r namd_r parest_r povray_r lbm_r wrf_r 
#                 blender_r  cam4_r imagick_r nab_r fotonik3d_r roms_r
#                 perlbench_s gcc_s mcf_s omnetpp_s xalancbmk_s x264_s deepsjeng_s 
#                 leela_s exchange2_s xz_s 
#                 bwaves_s cactuBSSN_s lbm_s wrf_s 
#                 cam4_s pop2_s imagick_s nab_s fotonik3d_s roms_s)

# cpu17=(perlbench_s gcc_s mcf_s omnetpp_s xalancbmk_s x264_s deepsjeng_s 
#                 leela_s exchange2_s xz_s 
#                 bwaves_s cactuBSSN_s lbm_s wrf_s 
#                 cam4_s pop2_s imagick_s nab_s fotonik3d_s roms_s)

# fastForward=(95000000   15          15  15          15
#              177000000  95000000    15  15          500000000
#              15         95000000    15  95000000    95000000
#              95000000   15          15  95000000    95000000)

# cpu17=(perlbench_s  gcc_s           mcf_s       omnetpp_s       xalancbmk_s
#         x264_s      deepsjeng_s     leela_s     exchange2_s     xz_s 
#         bwaves_s    cactuBSSN_s     lbm_s       wrf_s           cam4_s 
#         pop2_s      imagick_s       nab_s       fotonik3d_s     roms_s)

cpu17=(mcf_s lbm_s wrf_s)


for i in "${!cpu17[@]}"
do
cd $GEM5_DIR/scripts
source ./run_spec17.sh "${cpu17[$i]}" baselineM  None
done

for i in "${!cpu17[@]}"
do
cd $GEM5_DIR/scripts
source ./run_spec17.sh "${cpu17[$i]}" baselineM  TaggedPrefetcher
done

for i in "${!cpu17[@]}"
do
cd $GEM5_DIR/scripts
source ./run_spec17.sh "${cpu17[$i]}" baselineM  StridePrefetcher
done

# for i in "${!cpu17[@]}"
# do
# cd $GEM5_DIR/scripts
# source ./run_spec17.sh "${cpu17[$i]}"  baselineM  None "${fastForward[$i]}"
# done

# for i in "${!cpu17[@]}"
# do
# cd $GEM5_DIR/scripts
# source ./run_spec17.sh "${cpu17[$i]}" baselineM    TaggedPrefetcher "${fastForward[$i]}"
# done

# for i in "${!cpu17[@]}"
# do
# cd $GEM5_DIR/scripts
# source ./run_spec17.sh "${cpu17[$i]}" baselineM  DCPTPrefetcher "${fastForward[$i]}"
# done

# for i in "${!cpu17[@]}"
# do
# cd $GEM5_DIR/scripts
# source ./run_spec17.sh "${cpu17[$i]}" baselineM  SignaturePathPrefetcher "${fastForward[$i]}"
# done

# for i in "${!cpu17[@]}"
# do
# cd $GEM5_DIR/scripts
# source ./run_spec17.sh "${cpu17[$i]}" baselineM  IndirectMemoryPrefetcher "${fastForward[$i]}"
# done





# for i in "${!cpu17[@]}"
# do
# cd $GEM5_DIR/scripts
# source ./run_spec17.sh "${cpu17[$i]}" baselineM  StridePrefetcher
# done

# for i in "${!cpu17[@]}"
# do
# cd $GEM5_DIR/scripts
# source ./run_spec17.sh "${cpu17[$i]}" baselineM  IrregularStreamBufferPrefetcher
# done

# for i in "${!cpu17[@]}"
# do
# cd $GEM5_DIR/scripts
# source ./run_spec17.sh "${cpu17[$i]}" baselineM  PIFPrefetcher
# done

# for i in "${!cpu17[@]}"
# do
# cd $GEM5_DIR/scripts
# source ./run_spec17.sh "${cpu17[$i]}" baselineM  IrregularStreamBufferPrefetcher
# done




